home *** CD-ROM | disk | FTP | other *** search
/ Vypalování CD / Vypalovani-CD-cd2.bin / D2 1.0 / d2.dsc < prev    next >
Text File  |  2002-06-12  |  5KB  |  286 lines

  1. external vdsinout.dll
  2. %l = "|"
  3. option fieldsep,%l
  4. title Disk Directory
  5. DIALOG CREATE,Disk Directory,-1,0,567,486,-
  6.   BUTTON(search;430;310;;;),-
  7.   LIST(LIST1;14;92;460;400;sorted;click),-
  8.   BUTTON(choosedir;10;10;;;Choose Dir),-
  9.   BUTTON(saved;40;10;;;Save File),-
  10.   BUTTON(loadd;70;10;;;Load File),-
  11.   check(samedir;250;10;70;;same dir),-
  12.   check(autoname;200;10;70;;autoname;1),-
  13.   check(autosave;225;10;70;;autosave;1),-
  14.   BUTTON(disc;275;10;;;),-
  15.   COMBO(samec;300;10;70;;e:\),-
  16.   check(adddiskch;330;10;70;;add disk;1),-
  17.   check(runlist;350;10;70;;run list;0),-
  18.   COMBO(exploretypec;380;10;70;;explore),-
  19.   BUTTON(merge;430;10;;;),-
  20.   COMBO(searchc;430;200;100),-
  21.   check(keeplist;430;480;70;;keeplist;0),-
  22.   check(stops;430;400;80;;stop;0),-
  23.   BUTTON(copy;430;100;;;),-
  24.   DLGTYPE(SAVEPOS),-
  25.   STATUS(STATUS)
  26.  
  27. list samec,add,c:\
  28. list samec,add,d:\
  29. list samec,add,e:\
  30. list samec,add,f:\
  31. list samec,add,g:\
  32. list exploretypec,add,explore
  33. list exploretypec,add,open
  34. list exploretypec,add,browse
  35.  
  36.  
  37. :evloop
  38.   wait event
  39.   goto @event()
  40.  
  41. :discbutton
  42. run @windir()\"explorer.exe /E,"@dlgtext(samec)
  43. goto evloop
  44.  
  45. :list1click
  46. %y = 
  47. %r = 
  48. %a = 
  49. %c =
  50. %Y = @item(list1)
  51. parse "%r;%A;%c", %Y
  52. if @file(%r)
  53.   if @dlgtext(runlist)
  54.     if @equal(@dlgtext(exploretypec),explore) 
  55.      run @windir()\"explorer.exe /E,"@path(%r)
  56.     end
  57.     if @equal(@dlgtext(exploretypec),open) 
  58.      shell open,%r
  59.     end
  60.     if @equal(@dlgtext(exploretypec),browse) 
  61.      shell open,@path(%r)
  62.     end
  63.  
  64.   end
  65.  goto filex
  66. end
  67. if @file(%r,d)
  68.     if @dlgtext(runlist)
  69.        run @windir()\"explorer.exe /E,"%r
  70.     end
  71. end
  72. :filex
  73. dialog set,status,cd: %c","  file: %r"," size: %a Bytes
  74.  
  75. %y = 
  76. %r = 
  77. %a = 
  78.  
  79. goto evloop
  80.  
  81. :copyBUTTON
  82. list list1,copy
  83. goto evloop
  84.  
  85. :searchBUTTON
  86.  
  87. if @not(@file(base.txt))
  88.  info No base.txt. Press merge.
  89.  goto evloop
  90. end
  91. dialog set,status, working
  92. dialog set,stops,0
  93. %a = 
  94. %b = 1
  95. %t = base.txt
  96. %x = 
  97. %y = 
  98. if @not(@dlgtext(keeplist))
  99.  list list1,clear
  100. end
  101.  
  102. repeat
  103.  
  104. %a = @IO(FPOSC,%t,%b,,@dlgtext(searchc))
  105. if @not(@equal(0,%a))
  106.     %b = %a
  107.    repeat
  108.     if @dlgtext(stops)
  109.      goto ends
  110.     end
  111.  
  112.    %b = @pred(%b)
  113.    until @equal(@IO(READC,%t,%b,%b,),:)
  114.    %x = @pred(%b)
  115.    %b = %a
  116.    repeat
  117.  
  118.      if @dlgtext(stops)
  119.       goto ends
  120.      end
  121.  
  122.    %b = @succ(%b)
  123.     if @equal(%b,@FILE(%t,z))
  124.     %a = 0
  125.     %y = %b
  126.      goto endgame
  127.     end
  128.    until @equal(@asc(@IO(READC,%t,%b,%b,)),10)
  129.    %y = @diff(%b,2)
  130. :endgame
  131.  
  132.  list list1,add,@IO(READC,%t,%x,%y,)
  133. end
  134. %b = @succ(%a)
  135.  
  136.    if @dlgtext(stops)
  137.     goto ends
  138.    end
  139.  
  140. until @equal(0,%a)
  141.  
  142. :ends
  143.  
  144. %a = 
  145. %b = 1
  146. %t = base.txt
  147. %x = 
  148. %y = 
  149.  
  150.  
  151. if @equal(@count(list1),0)
  152.  dialog set,status,Search string not found.
  153. else
  154.  dialog set,status,Search string found in @count(list1) places.
  155. end
  156.  
  157. goto evloop
  158.  
  159. :choosedirBUTTON
  160.  
  161.  %d = 
  162.   if @dlgtext(samedir)
  163.    %d = @dlgtext(samec)
  164.   else
  165.    %d = @dirdlg()
  166.   end
  167.  %c = %d
  168. %q = 
  169. %q =  @volinfo(%c,n).txd
  170.  
  171.  
  172. if @not(%d)
  173.  goto evloop
  174. end
  175.  
  176. if @not(@dlgtext(autoname))
  177.  %q = @input(name,%q)
  178. end
  179.  
  180.  
  181. if %d
  182.   dialog set,samec,%d
  183.  if @equal(@LEN(%d),3)
  184.  %d = @SUBSTR(%d,1,2)
  185.  end
  186. list list1,clear
  187.  list 1,create
  188.  list 2,create
  189.  list 3,create
  190.   dialog set,status,Indexing ...
  191.   list 1,filelist,%D,*
  192.   repeat
  193.    dialog set,status,Searching %D
  194.     list 2,filelist,%d\*.*,srhad
  195.     repeat
  196.       %F = @next(2)
  197.       if %F
  198.           if @dlgtext(adddiskch)
  199.            list 3,add,%F%l@file(%f,z)%l%q
  200.           end
  201.           if @not(@dlgtext(adddiskch))
  202.            list 3,add,%F%l@file(%f,z)
  203.           end
  204.       end
  205.     until @null(%F)
  206.     list 2,clear
  207.     %D = @next(1)
  208.    until @null(%D)
  209.   list 1,close
  210.   list 2,close
  211.  list list1,assign,3
  212.  list 3,close
  213. dialog set,status, Done
  214. end
  215.  
  216.  
  217. if @dlgtext(autosave)
  218.  
  219.    if @file(@name(%q).txd)
  220.       if @ASK(File @name(%q).txd exists.@cr()Do you want to continue?)
  221.        LIST list1,savefile,@name(%q).txd
  222.        END
  223.    else
  224.        LIST list1,savefile,@name(%q).txd
  225.    end
  226.  
  227. end
  228.  
  229.  
  230.   goto evloop
  231.  
  232. :savedBUTTON
  233. %f = 
  234.  %F = @filedlg(,Save file,%q)
  235. if %f
  236.   dialog title, Disk Directory - @name(%f).txd
  237.    if @file(@name(%f).txd)
  238.        if @ASK(File @name(%f).txd exists.@cr()Do you want to continue?)
  239.         LIST list1,savefile,@name(%q).txd
  240.        END
  241.    else
  242.     LIST list1,savefile,%f
  243.    end
  244.  
  245. end
  246.  
  247.   goto evloop
  248.  
  249. :mergebutton
  250. file delete,base.txt
  251. list 1,create
  252. list 1,savefile,base.txt
  253. list 1,close
  254.  
  255. list 1,create,sorted
  256.  
  257. list 1,filelist,*.txd
  258. list 1,seek,0
  259. repeat
  260. %m = @IO(APPND,base.txt,@item(1))
  261.  
  262. if @next(1)
  263.  if @item(1)
  264.  end
  265. end
  266. until @not(@item(1))
  267.  
  268. list 1,close
  269. dialog set,status,base.txt created
  270. goto evloop
  271.  
  272.  
  273.  
  274. :loaddBUTTON
  275. %d = 
  276. %d = @filedlg()
  277. if %d
  278.   dialog title, Disk Directory - @name(%d).txd
  279.   LIST list1,loadfile,%d
  280. end
  281.   goto evloop
  282.  
  283.  
  284.  
  285. :CLOSE
  286.   exit